#include "h_cc2640r2f_define.h"

#include <stdio.h>
#include <stdarg.h>

#include "h_cc2640r2f_uart.h"
#include "s_sc_uart.h"

#include <icall_ble_api.h>

unsigned char H_CC2640R2F_MAC_ADDR[6] = {0x99, 0x99, 0x66, 0x66, 0x99, 0x99};


#define H_CC2640R2F_printTxbuff                  S_SC_UART_WriteBuff//H_CC2640R2F_UART_TxBuff

static char buf[H_CC2640R2F_UART_RxLength];
void H_CC2640R2F_UART_Debug(const char* format, ...)
{
    va_list arg;
    va_start(arg, format);
//    char buf[H_CC2640R2F_UART_RxLength];
    unsigned short len;
    len = vsprintf((char*)buf, format, arg);
    H_CC2640R2F_printTxbuff(buf, len);
}

void H_CC2640R2F_UART_DebugTxBuff(unsigned char *data, unsigned short len)
{
    H_CC2640R2F_printTxbuff((unsigned char *)data, len);
}


void H_CC2640R2F_UART_Debugprinthex(unsigned char *data, unsigned short len)
{

    while(len--)
    {

        H_CC2640R2F_UART_Debug("%02x", *data++);
    }
    H_CC2640R2F_UART_Debug("\r\n");

}

